let oInput = document.createElement('input');
oInput.setAttribute('type', 'file');
oInput.setAttribute('value', '上传文件');
document.body.appendChild(oInput);
// <input type=​"file" value=​"上传文件">​
// oInput
// <input type=​"file" value=​"上传文件">​
// oInput.files[0]
// File {name: "17_171020101112_1.jpg", lastModified: 1566176498710, lastModifiedDate: Mon Aug 19 2019 09:01:38 GMT+0800 (中国标准时间), webkitRelativePath: "", size: 90158, …}lastModified: 1566176498710lastModifiedDate: Mon Aug 19 2019 09:01:38 GMT+0800 (中国标准时间) {}name: "17_171020101112_1.jpg"size: 90158type: "image/jpeg"webkitRelativePath: ""__proto__: File
let formDate = new FormData();
// 表单上传
// formData : 好处  : 不会刷新 + ajax
formDate.append('file', oInput.files[0]);
let srcURL = URL.createObjectURL(oInput.files[0]);
// undefined
// scrURL
// "blob:chrome://new-tab-page/ae63b965-a02c-48b8-a8fc-dc5f8132662d"
let image = new Image();
image.src = srcURL;
// "blob:chrome://new-tab-page/ae63b965-a02c-48b8-a8fc-dc5f8132662d"
document.body.appendChild(image);
